package com.crazy.util;

import com.crazy.waf.attack.SqlInjection;
import com.crazy.waf.attack.XSS;

/**
 * @author zhaochaofeng
 * @version 1.0
 * @date 2020/11/17 14:15
 */
public class WafUtils {
    public WafUtils() {
    }

    public static String stripXss(String value) {
        return value == null ? null : (new XSS()).strip(value);
    }

    public static String stripSqlInjection(String value) {
        return value == null ? null : (new SqlInjection()).strip(value);
    }

    public static String stripSqlXss(String value) {
        return value == null ? null : stripXss(stripSqlInjection(value));
    }
}
